#include <stdio.h>
#include <sys/wait.h>
#include <unistd.h>

int main() {
  pid_t pid;

  for (int i = 0; i < 5; i++) {
    pid = fork();
    if (pid > 0)
      break;
  }
  if (pid > 0)
  {
    printf("my pid %d,my child %d\n", getpid(), pid);
    pid = waitpid(pid,NULL,0);
  }

  return 0;
}
